﻿<%@ Page Title="采购药品统计" Language="C#" MasterPageFile="~/Master/MasterPage.master"
	AutoEventWireup="True" CodeBehind="HospitalCompanyDRugsTotal.aspx.cs" Inherits="TotalDrugs_HospitalCompanyDRugsTotal" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

	<script language="javascript" type="text/javascript">
        function txtClear() {
            var txtBox = document.getElementsByTagName("input")
            for (var i = 0; i < txtBox.length; i++) {
                if (txtBox[i].type == "text") {
                    txtBox[i].value = "";
                }
            }
            document.getElementById("ctl00_ContentPlaceHolder1_ddlQualityLevel").selectedIndex = 0;
            document.getElementById("ctl00_ContentPlaceHolder1_ddlInsuranceType").selectedIndex = 0;
            document.getElementById("ctl00_ContentPlaceHolder1_ddlSortName").selectedIndex = 0;
            document.getElementById("ctl00_ContentPlaceHolder1_ddlLevels").selectedIndex = 0;
        }
	</script>

	<script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
	<div id="tabcontent2">
		<uc1:QueryControl ID="QueryControl1" runat="server" />
		<%--<asp:BoundField HeaderText="配送总量" DataField="DistributeCountSum" />
                <asp:BoundField HeaderText="采购总金额" DataField="PurchaseAmountSum" />
                <asp:BoundField HeaderText="入库总量" DataField="WarehouseCountSum" />
                <asp:BoundField HeaderText="入库总金额" DataField="WarehouseAmountSum" />--%>
	</div>
	<div>
		<asp:GridView ID="gvwInfo" runat="server" AutoGenerateColumns="false" EmptyDataText="暂无符合条件的数据！"
			Width="100%" CssClass="mainlist" OnRowCommand="gvwInfo_RowCommand">
			<Columns>
				<%--<asp:BoundField HeaderText="配送总量" DataField="DistributeCountSum" />
                <asp:BoundField HeaderText="采购总金额" DataField="PurchaseAmountSum" />
                <asp:BoundField HeaderText="入库总量" DataField="WarehouseCountSum" />
                <asp:BoundField HeaderText="入库总金额" DataField="WarehouseAmountSum" />--%>
				<asp:TemplateField HeaderText="序号">
					<ItemTemplate>
						<%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
					<HeaderStyle Width="30px" />
				</asp:TemplateField>
				<asp:BoundField HeaderText="通用名" DataField="ProductName" />
				<asp:BoundField HeaderText="剂型" DataField="MedicineModelName" />
				<asp:BoundField HeaderText="规格" DataField="Outlookc" />
				<asp:BoundField HeaderText="包装" DataField="Factor" />
				<asp:BoundField HeaderText="单位" DataField="Unit" />
				<%--                <asp:BoundField HeaderText="包装" DataField="Pack" />--%>
				<asp:BoundField HeaderText="质量层次" DataField="QualityLevel" />
				<asp:BoundField HeaderText="生产企业" DataField="CompanyName_SC" />
				<asp:BoundField HeaderText="配送企业" DataField="CompanyName_PS" />
				<asp:BoundField HeaderText="采购医院" DataField="HospitalName" />
				<asp:BoundField HeaderText="采购次数" DataField="CountOrder" />
				<asp:BoundField HeaderText="药品编号" DataField="ProcureCatalogID" Visible="false" />
				<asp:BoundField HeaderText="配送企业编号" DataField="CompanyID_PS" Visible="false" />
				<asp:BoundField HeaderText="采购医院" DataField="HospitalID" Visible="false" />
				<asp:BoundField DataField="PurchaseCountTotal" HeaderText="采购总数量" />
				<asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" DataFormatString="{0:N2}" />
				<asp:BoundField DataField="PriceAvg" HeaderText="平均采购价" DataFormatString="{0:N3}" />
				<asp:BoundField DataField="DistributeRate" HeaderText="配送率" DataFormatString="{0:P2}"
					NullDisplayText="NA" />
				<asp:BoundField DataField="DistributeCountTotal" HeaderText="总配送量" />
				<asp:BoundField DataField="WareHouseCountTotal" HeaderText="入库总数量" />
				<asp:BoundField DataField="WareHouseAmountTotal" HeaderText="入库总金额" DataFormatString="{0:N2}" />
				<asp:BoundField DataField="WareHouseRate" HeaderText="入库率" DataFormatString="{0:P2}"
					NullDisplayText="NA" />
				<asp:BoundField DataField="AdditionRate" HeaderText="加成比" DataFormatString="{0:P2}" />
				<asp:TemplateField HeaderText="查看详细">
					<ItemTemplate>
						<asp:LinkButton ID="lbnDetail" runat="server" CommandName="DirectByDetail" CommandArgument='<%# Eval("ProcureCatalogID")+","+Eval("CompanyID_PS")+","+Eval("HospitalID") %>'
							ToolTip="查看该条记录的详细信息">查看详细</asp:LinkButton>
					</ItemTemplate>
				</asp:TemplateField>
			</Columns>
		</asp:GridView>
	</div>
	<div class="page">
		<webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
		</webdiyer:AspNetPager>
	</div>
	<%--<asp:Button ID="btnExcel" runat="server" CssClass="btn" Text="导出数据"  
        onclick="btnExcel_Click" />--%>
	<hz:HzButton ID="btnExcel" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel_Click" />
	&nbsp;统计：<asp:Label runat="server" ID="lblCount"></asp:Label>
	<div class="listip">
		<ul>
			<li>说明:<span>可以点击相应按钮进入查看详细信息</span></li>
		</ul>
	</div>
</asp:Content>
